package com.demo2do.fms.admin.service.supplier;

import java.util.List;
import java.util.Map;

import org.springframework.web.multipart.MultipartFile;

import com.demo2do.core.entity.page.Page;
import com.demo2do.fms.admin.entity.export.supplier.DriverSheet;
import com.demo2do.fms.admin.entity.search.supplier.DriverAuditSearch;
import com.demo2do.fms.admin.entity.search.supplier.DriverSearch;
import com.demo2do.fms.admin.entity.security.Login;
import com.demo2do.fms.admin.entity.upload.UploadResult;
import com.demo2do.fms.admin.entity.vam.DriverStat;
import com.demo2do.fms.entity.driver.Driver;
import com.demo2do.fms.entity.driver.DriverAuditStatus;
import com.demo2do.fms.entity.vam.DriverLine;

/**
 *
 * @author Ark
 *
 */
public interface DriverService {
    
    /**
     * 
     * @param login
     * @return
     */
    public int count(Login login);
    
   /**
    * 
    * @param login
    * @param status
    * @param bind
    * @return
    */
    public int count(Login login, DriverAuditStatus status, boolean bind);

    /**
     * @param login
     * @param status
     * @return
     */
    public int count(Login login, DriverAuditStatus status);
    
    /**
     * 
     * @param supplierIds
     * @return
     */
    public int count(List<Long> supplierIds);
    
    /**
     * 
     * @param supplierIds
     * @param status
     * @return
     */
    public int count(List<Long> supplierIds, DriverAuditStatus status);
    
    /**
     * @param search
     * @return
     */
    public int count(DriverSearch search);
    
    /**
     * 
     * @param search
     * @return
     */
    public int count(DriverAuditSearch search);
    
    /**
     * 
     * @param login
     * @param page
     * @return
     */
    public List<Driver> list(Login login, Page page);
    
    /**
     * 
     * @param login
     * @param status
     * @param bind
     * @param page
     * @return
     */
    public List<Driver> list(Login login, DriverAuditStatus status, boolean bind, Page page);
    
    /**
     * 
     * @param login
     * @param status
     * @param page
     * @return
     */
    public List<Driver> list(Login login, DriverAuditStatus status, Page page);
    
    /**
     * 
     * @param supplierId
     * @param status
     * @return
     */
    public List<Driver> list(Long supplierId, DriverAuditStatus status);
    
    /**
     * 
     * @param vehicleCode
     * @param status
     * @return
     */
    public List<Driver> list(String vehicleCode, DriverAuditStatus status);
    
    /**
     * 
     * @param status
     * @return
     */
    public List<Driver> list(DriverAuditStatus status);
    
    /**
     * @param search
     * @param page
     * @return
     */
    public List<Driver> list(DriverSearch search, Page page);
    
    /**
     * 
     * @param search
     * @param page
     * @return
     */
    public List<Driver> search(DriverAuditSearch search, Page page);
    
    /**
     * @param search
     * @return
     */
    public List<DriverSheet> export(DriverSearch search);
    
    /**
     * 
     * @param supplierIds
     * @param page
     * @return
     */
    public List<Driver> list(List<Long> supplierIds, Page page);
    
    /**
     * 
     * @param supplierIds
     * @param status
     * @param page
     * @return
     */
    public List<Driver> list(List<Long> supplierIds, DriverAuditStatus status, Page page);
    
    /**
     * @param id
     * @return
     */
    public Driver load(Long id);
    
    /**
     * 
     * @param supplierId
     * @param code
     * @param status
     * @return
     */
    public Driver load(Long supplierId, String code, DriverAuditStatus status);
    
    /**
     * @param code
     * @return
     */
    public Map<String, Object> existCode(String code);
    
    /**
     * @param citizenCode
     * @return
     */
    public Map<String, Object> existCitizen(String citizenCode);
    
    /**
     * @param mobile
     * @return
     */
    public Map<String, Object> existMobile(String mobile);
    
    /**
     * @param brandCNCode
     * @return
     */
    public List<DriverStat> listByBrand(String brandCNCode);
    
    /**
     * @param brandCNCodes
     * @return
     */
    public List<DriverLine> listByBrand(List<String> brandCNCodes);
    
    /**
     * @param driver
     * @param login
     */
    public void create(Driver driver, Login login);
    
    /**
     * 批量导入
     * 
     * @param login
     * @param file
     * @return
     */
    public List<UploadResult> upload(Login login, MultipartFile file);
    
    /**
     * 
     * @param id
     * @param operator
     */
    public void delete(Long id, Long operator);

	/**
     * 递交审核
     * 
     * @param driver
     * @param login
     */
    public void audit(Driver driver, Login login);
    
    /**
     * 批量递交审核
     * 
     * @param driverIds
     * @param login
     * @return
     */
    public Map<String, Integer> batchAudit(List<Long> driverIds, Login login);
    
    /**
     * @param driver
     * @param operator
     */
    public void adopt(Driver driver, Long operator);
    
    /**
     * @param driver
     * @param operator
     */
    public void reject(Driver driver, Long operator);
    
    /**
     * 
     * @param driver
     * @param login
     */
    public void quit(Driver driver, Login login);
    
    /**
     * @param driver
     * @param operator 
     */
    public void editBasic(Driver driver, Long operator);
    
    /**
     * @param driver
     */
    public void editProfile(Driver driver);
    
}
